package cn.wancat.pattern.behavioral.chainofresponsibility;

/**
 * 处理视频相关的业务
 */
public class VideoHandler extends Handler {
    @Override
    void apply(Course course) {
        String video = course.getVideo();
        if(video!=null && !"".equals(video)){
            System.out.println(course.getName() + "手记完整，允许发布");
            if(handler!=null){
                handler.apply(course);
            }
        }else{
            System.out.println(course.getName() + "手机不完整，不允许发布");
            return;
        }
    }
}
